#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QAction>
#include<Image.h>
#include<Matrix.h>
QString *File;
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    ui->setupUi(this);
       //设置信号，点击那个open可以出现选项
       connect(ui->actionopen,&QAction::triggered,[=](){
           //打开的文件用filename 保存下来
      QString filename= QFileDialog::getOpenFileName(this,"选择图片;",QCoreApplication::applicationFilePath());
       //if successfully open
      File=&filename;
      if(filename.isEmpty()){
          QMessageBox::warning(this,"提示","请选择一张图");
      }
   // 显示到屏幕
      QPixmap pix (filename);
      ui->label->setPixmap(pix);
       });
      // File=filename;
}

MainWindow::~MainWindow()
{
    delete ui;
}



void MainWindow::on_pushButton_clicked()
{

}
